let keys = [];
export function gets(key) {
    if (!sessionStorage[key]) {
        return sessionStorage[key];
    } else {
        return JSON.parse(sessionStorage[key]);
    }
}
export function sets(key, value) {
    if (!value) {
        sessionStorage[key] = value;
        console.log('请检查存入的数据是否有效---来自localData');
    } else {
        sessionStorage[key] = JSON.stringify(value);
    }
}
export function remove(key) {
    if (key.indexOf(',') > -1) {
        this.keys = key.split(',');
        for (let i = 0; i < this.keys.length; i++) {
            sessionStorage.removeItem(this.keys[i]);
        }
    } else {
        sessionStorage.removeItem(key);
    }
}
export function clear() {
    sessionStorage.clear();
}
